import instance from '@/utils/axios'

// 搜索
const searchMusic = (keywords) => {
  return instance({
    url:'/cloudsearch',
    method: "get",
    params:keywords
  })
}

// 热门搜索
const setarchHot = () => {
  return instance({
    url:'/search/hot/detail',
    method:'get'
  })
}

const song = (ids) => {
  return instance({
    url: "song/detail",
    method: "get",
    params:ids
  })
}

// 获取歌词
const songGeci = (id) => {
  return instance({
    url:'/lyric',
    method:'get',
    params:id
  })
}

// 查看更多歌手歌曲
const gengSong = (id) => {
  return instance({
    url:'/artist/songs',
    method:'get',
    params:id
  })
}

//歌手mv
const songMv = (id) => {
  return instance({
    url:'/artist/mv',
    method:'get',
    params:id
  })
}

const songXiang = (id) => {
  return instance({
    url:'/artist/desc',
    method:'get',
    params:id
  })
}

// mv地址
const mvAddress = (id) => {
  return instance({
    url:'/mv/url',
    method:'get',
    params:id
  })
}

// mv 点赞评论数据
const commentMv = (mvid) => {
  return instance({
    url:'/mv/detail/info',
    method:'get',
    params:mvid
  })
}

export {searchMusic,setarchHot,song,songGeci,gengSong,songMv,songXiang,mvAddress,commentMv}
